package com.xinsoft.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.xinsoft.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * 委外合同
 * @TableName scm_outsourcing_contract
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="scm_outsourcing_contract")
@Data
public class ScmOutsourcingContract extends BaseEntity implements Serializable {


    /**
     * 供应商id
     */
    @NotNull(message = "供应商不能为空")
    private Integer supplierId;

    /**
     * 采购员id
     */
    @NotNull(message = "采购员不能为空")
    private Integer purchasePersonId;

    /**
     * 合同编号
     */
    private String contractCode;

    /**
     * 合同类型
     */
    private Integer contractType;

    /**
     * 合同日期
     */
    @NotNull(message = "合同日期不能为空")
    private Date contractDate;

    /**
     * 合同有效期
     */
    @NotNull(message = "合同有效期不能为空")
    private Date contractExpireDate;

    /**
     * 审核状态
     */
    private Integer auditSign;

    /**
     * 开票总额
     */
    private BigDecimal invoicedAmount;

    /**
     * 未开票总额
     */
    private BigDecimal uninvoicedAmount;

    /**
     * 关闭状态(0未关闭/1关闭)
     */
    private Integer doClose;

    /**
     * 备注
     */
    private String remark;

    /**
     * 供应商合同编号
     */
    private String supplierContractCode;

    /**
     * 审批状态 默认0暂存, 1:已提交(审批中), 2:驳回, 3:审批通过
     */
    private Integer approveStatus;

    /**
     * 申请时间
     */
    private Date applyTime;

    /**
     * 申请人ID
     */
    private Integer applyPersonId;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}